<%@ page language="java" import="java.util.*,StudentScore.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>密码修改成功</title>
</head>
<body style="text-align:center;">
<form name="postForm" action="Main.jsp" method="post">
 <%
    	StudentDao sdao = new StudentDaoJDBC();
    	String stuno = request.getParameter("stuno");
    	%>
    	 <td><input type="text" id="a" name="stuno" value=<%=stuno%>></td>
    	<% 
    	String oldpassword = request.getParameter("oldpassword");
    	String newpassword1 = request.getParameter("newpassword1");
    	String newpassword2 = request.getParameter("newpassword2");
        if(sdao.changepassword(stuno,oldpassword,newpassword1,newpassword2)>0){
        	%>
        	<p>修改成功！</p>       	
        	<%
        }
        else{
        %>
        	<p>修改失败！</p>
        <%	
        }
    	%>
	<input type="submit" value="MENU" />
	</form>

</body>
</html>